import request from '@/config/axios'

// ERP基础资料-压线类型 VO
export interface BasePressingTypeVO {
  id: string // id
  pressingNumber: string // 压线编号
  pressingTypeName: string // 压线类型
  isDefault: boolean // 是否为默认压线 (0-否, 1-是)
}

// ERP基础资料-压线类型 API
export const BasePressingTypeApi = {
  // 查询ERP基础资料-压线类型分页
  getBasePressingTypePage: async (params: any) => {
    return await request.get({ url: `/erp/base-pressing-type/page`, params })
  },

  // 查询ERP基础资料-压线类型详情
  getBasePressingType: async (id: number) => {
    return await request.get({ url: `/erp/base-pressing-type/get?id=` + id })
  },

  // 新增ERP基础资料-压线类型
  createBasePressingType: async (data: BasePressingTypeVO) => {
    return await request.post({ url: `/erp/base-pressing-type/create`, data })
  },

  // 修改ERP基础资料-压线类型
  updateBasePressingType: async (data: BasePressingTypeVO) => {
    return await request.put({ url: `/erp/base-pressing-type/update`, data })
  },

  // 删除ERP基础资料-压线类型
  deleteBasePressingType: async (id: number) => {
    return await request.delete({ url: `/erp/base-pressing-type/delete?id=` + id })
  },

  // 导出ERP基础资料-压线类型 Excel
  exportBasePressingType: async (params) => {
    return await request.download({ url: `/erp/base-pressing-type/export-excel`, params })
  }
}